//
//  LDGCD.h
//
//  Created by Dean on 16/7/29.
//  Copyright © 2016年 Dean. All rights reserved.
//

#import <Foundation/Foundation.h>
///宏定义五个系统中可以直接获取的队列
// 主队列
// 四个不同优先级的全局并发队列
#define globalQueue \
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)

#define globalHighPriorityQueue \
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)

#define globalLowPriorityQueue \
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0)

#define globalBackgroundPriorityQueue \
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)


@interface TGGCD : NSObject
#pragma mark  执行同步任务
/**同步任务 */
+ (void)executeSyncTask:(dispatch_block_t)task;
#pragma mark
/**异步任务*/
+ (void)executeAsyncTask:(dispatch_block_t)task;

#pragma mark  主线程调用
/** 主线程UI任务 */
+ (void)executeMainAsyncTask:(dispatch_block_t)task;
/**主线程操作*/
+ (void)executeMainOpeation:(void (^)(void))block;
/**延迟执行任务*/
+ (void)executeAfterTime:(int)time task:(void (^)(void))block;
@end
